package com.cln.oldtreewalker;


public abstract class ATraverser implements ITraverser {

	protected String result = new String();

	public abstract String doTraverse(TreeNode root);

	public void visitChild(TreeNode child) {
		if (child != null)
			doTraverse(child);
	}

	public void visitRoot(TreeNode root) {
		this.result += root.getTreeNodeString();
	}

	public String getResult() {
		return result;
	}

}